{% macro gen_table(enterprise_honours) %}
    <table id="honour-table"
           class="table table-bordered table-hover table-condensed table-striped">
        <thead>
        <tr>
            <th>排序</th>
            <th>荣誉资质说明</th>
            <th>荣誉资质图片</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for each in enterprise_honours %}
            <tr>
                <td>{{ each.weight }}</td>
                <td>{{ each.honour_title }}</td>
                <td>
                    <img src="{{ each.honour_img_url }}" width="100px" height="100px">
                </td>
                <td>
                    <a
                        class="btn btn-xs btn-primary"
                        href="{{ url_for('enterprise_bp.enterprise_item_edit', item_key='honour', item_id=each.id) }}"
                        target="_self"
                    >编辑</a><br>
                    <a
                        class="btn btn-xs btn-danger" style="margin: 3px;"
                        href="{{ url_for('enterprise_bp.enterprise_item_delete', item_key='honour', item_id=each.id) }}"
                        target="_self"
                        onclick="return confirm('确定要删除此荣誉资质吗?')"
                    >删除</a><br>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endmacro %}
